package _作业.Thread;

public class Demo04 {
    public static void main(String[] args) {
        new AThread().start();
        new BThread().start();
    }
}
class AThread extends Thread{
    @Override
    public void run() {
        long sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum += i;
        }
        System.out.println(sum);
    }
}
class BThread extends Thread{
    public void run() {
        long sum = 0;
        for (int i = 1; i <= 100000; i++) {
            sum += i;
        }
        System.out.println(sum);
    }
}